﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GhostGame._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title></title>
</head>
<body>
    <form id="form1" runat="server" style="width: auto; height: auto">
    <div>
        <asp:Label Font-Size="Small" runat="server" Width="100%">你的名字</asp:Label>
        <asp:TextBox runat="server" ID="TBUserName" Width="100%"></asp:TextBox>
        <asp:Button runat="server" ID="SetName" Width="100%" Text="设置名字" 
            onclick="SetName_Click" />
        <asp:Label Font-Size="Small" runat="server" Width="100%">房间名</asp:Label>
        <asp:TextBox runat="server" ID="TBRoomName" Width="100%"></asp:TextBox>
        <asp:Button runat="server" ID="NewRoom" Width="100%" Text="创建游戏" 
            onclick="NewRoom_Click" />
        <asp:Label Font-Size="Small" runat="server" Width="100%">房间列表</asp:Label>
        <asp:Repeater runat="server" ID="GameList" onitemcommand="GameList_ItemCommand" 
            onitemdatabound="GameList_ItemDataBound">
            <ItemTemplate>
                <div>
                    <asp:Button runat="server" CommandName="JoinRoom" />
                    <asp:Label runat="server" Font-Size="Small">
                        <%# DataBinder.Eval(Container.DataItem, "HolderName") %>
                    </asp:Label>
                </div>
            </ItemTemplate>
        </asp:Repeater>
        <asp:Button runat="server" Width="100%" Text="刷新" onclick="Refresh_Click"></asp:Button>
    </div>
    </form>
</body>
</html>
